package com.ithong.service.impl;

import com.ithong.dao.BillMapper;
import com.ithong.entity.Bills;
import com.ithong.service.BillService;
import com.ithong.vo.BillVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class BillServiceImpl implements BillService {

    @Resource
    private BillMapper billMapper;

    /**
     *查询账单列表
     * @param vo
     * @return
     */
    public List<Bills> findBillList(BillVo vo) {
        return billMapper.findBillList(vo);
    }

    /**
     * 添加
     * @param bills
     * @return
     */
    public int addBill(Bills bills) {
        return billMapper.addBill(bills);
    }


    /**删除
     *
     * @param bills
     * @return
     */
    public int updateBill(Bills bills) {
        return billMapper.updateBill(bills);
    }

    /**
     * 删除
     * @param id
     * @return
     */
    public int deleteById(Integer id) {
        return billMapper.deleteById(id);
    }
}
